var h=document.getElementsByClassName("happy1")[0];
var s=document.getElementsByClassName("sad1")[0];
var happy=document.getElementsByClassName("happy")[0];
var sad=document.getElementsByClassName("sad")[0];
var happy1=document.getElementsByClassName("happy2")
console.log(h.display);
happy.onclick=function()
{
    h.style.display="block";
}
console.log(h.style.display);
console.log(s.style.display);
sad.onclick=function()
{
    s.style.display="block";
}
console.log(s.style.display);
happy1.onclick=function()
{
    h.style.display="none";
    s.style.display="none";
}